<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"><fmt:message key="loanRequest.mainApplicant"/></h3>

        <div class="box-tools pull-right">
            <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
        </div>
        <!-- /.box-tools -->
    </div>
    <%@ include file="/common/messages.jsp" %>
    <div class="box-body">
        <div class="form-horizontal margin">
            <input type="text" name="disabled" id="isDisable" hidden value="${!editCondition}"/>
            <form:hidden path="requestPerson.id"/>
            <form:hidden path="requestPersonCreditQuestionnaire.id"/>
            <form:hidden path="coPersonCreditQuestionnaire.id"/>
            <form:hidden path="dbPersonCreditQuestionnaire.id"/>
            <form:hidden path="status"/>
            <form:hidden path="copyFromRequestId"/>
            <div class="form-group">
                <spring:bind path="loanRequest.requestPerson.name">
                <appfuse:label key="loanPerson.name" path="loanRequest.requestPerson.name"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.name" id="requestUser"
                                maxlength="255" disabled="${!editCondition}" />
                    <form:errors path="requestPerson.name" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.gender" path="loanRequest.requestPerson.gender"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.gender">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.gender" id="gender"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableGenders}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.gender" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.birthday" path="loanRequest.requestPerson.birthday"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.birthday">
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control datepicker" path="requestPerson.birthday"
                                disabled="${!editCondition}"
                                id="birthday"
                                maxlength="255"/>
                    <form:errors path="requestPerson.birthday" cssClass="help-block"/>
                </div>
                    <div class="col-sm-1">
                        <input id="requestorAge" class="form-control" type="text" readonly placeholder="<fmt:message key="loanRequest.age"/>"/>
                    </div>
            </div>
            <div class="form-group">
                <appfuse:label key="loanPerson.idType" path="loanRequest.requestPerson.idType"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.idType">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.idType" id="idType"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableIdTypes}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.idType" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.idNo" path="loanRequest.requestPerson.idNo"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.idNo">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.idNo" id="idNo"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <p class="text-danger" id="idValidate"></p>
                    <form:errors path="requestPerson.idNo" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanRequest.idExpireTime" path="loanRequest.requestPerson.dueDate"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.dueDate">
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control datepicker2" path="requestPerson.dueDate"
                                disabled="${!editCondition}"
                                id="dueDate"
                                maxlength="255"/>
                    <form:errors path="requestPerson.dueDate" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <appfuse:label key="loanPerson.maritalStatus" path="loanRequest.requestPerson.maritalStatus"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.maritalStatus">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}${(loanRequest.requestPerson.maritalStatus!=loanRequest.requestPersonCreditQuestionnaire.maritalStatus) ? ' has-error' : ''} ">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.maritalStatus"
                                 disabled="${!editCondition}"
                                 id="maritalStatus">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableMaritalStatus}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.maritalStatus" cssClass="help-block"/>
                        <security:authorize ifNotGranted="ROLE_DEALER_USER,ROLE_DEALER_ADMIN">
                    <p class="text-danger" style="${(loanRequest.requestPerson.maritalStatus!=loanRequest.requestPersonCreditQuestionnaire.maritalStatus) ? 'display:block' : 'display:none'}">
                        <fmt:message key="errors.not.consist"/>
                    </p>
                        </security:authorize>
                </div>
                <appfuse:label key="loanPerson.personIncome" path="loanRequest.requestPerson.personIncome"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.personIncome">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.personIncome"
                                disabled="${!editCondition}"
                                id="personIncome" maxlength="255"/>
                    <form:errors path="requestPerson.personIncome" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.coupleIncome" path="loanRequest.requestPerson.coupleIncome"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.coupleIncome">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.coupleIncome"
                                disabled="${!editCondition}"
                                id="coupleIncome" maxlength="255"/>
                    <form:errors path="requestPerson.coupleIncome" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <appfuse:label key="loanPerson.propertyType" path="loanRequest.requestPerson.propertyType"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.propertyType">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.propertyType"
                                 disabled="${!editCondition}"
                                 id="propertyType">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availablePropertyTypes}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.propertyType" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.annualIncome" path="loanRequest.requestPerson.annualIncome"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.annualIncome">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.annualIncome"
                                disabled="${!editCondition}"
                                id="annualIncome" maxlength="255"/>
                    <form:errors path="requestPerson.annualIncome" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.homeTelNo" path="loanRequest.requestPerson.homeTelNo"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.homeTelNo">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control phone" path="requestPerson.homeTelNo"
                                disabled="${!editCondition}"
                                id="homeTelNo" maxlength="255" />
                    <form:errors path="requestPerson.homeTelNo" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.requestPerson.mobileNo">
                <appfuse:label key="loanPerson.mobileNo" path="loanRequest.requestPerson.mobileNo"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''} ${(loanRequest.requestPerson.mobileNo!=loanRequest.requestPersonCreditQuestionnaire.mobileNo) ? '    has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.mobileNo" id="mobileNo"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <p class="text-danger" id="mobileValidate"></p>
<security:authorize ifNotGranted="ROLE_DEALER_USER,ROLE_DEALER_ADMIN">

<span class="text-danger" style="${(loanRequest.requestPerson.mobileNo!=loanRequest.requestPersonCreditQuestionnaire.mobileNo) ? 'display:block' : 'display:none'}"><fmt:message key="errors.not.consist"/></span>
</security:authorize>
                        <form:errors path="requestPerson.mobileNo" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.email">
                <appfuse:label key="loanPerson.email" path="loanRequest.requestPerson.email"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.email" id="email"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <form:errors path="requestPerson.email" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.mailType" path="loanRequest.requestPerson.mailType"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.mailType">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.mailType"
                                 disabled="${!editCondition}"
                                 id="mailType">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableMailTypes}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.mailType" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <form:hidden path="requestPerson.address.id"/>
                <spring:bind path="loanRequest.requestPerson.address.province">
                <label class="control-label col-sm-1"><fmt:message key="loanRequest.address"/>*</label>
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <input value="${loanRequest.requestPerson.address.province}" id="provinceValue" hidden/>
                    <form:select cssClass="form-control" path="requestPerson.address.province" id="province"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.address.province" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.address.city">
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <input value="${loanRequest.requestPerson.address.city}" id="cityValue" hidden/>
                    <select class="form-control" name="requestPerson.address.city"
                            id="city" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.city"/></option>
                    </select>
                    <form:errors path="requestPerson.address.city" cssClass="help-block"/>
                </div>
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <input value="${loanRequest.requestPerson.address.county}" id="countyValue" hidden/>
                    <select class="form-control" name="requestPerson.address.county"
                            id="county" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.county"/></option>
                    </select>
                    <form:errors path="requestPerson.address.county" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.address.address">
                <div class="col-sm-5${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.address.address" id="address"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <p class="text-danger" id="addressError"></p>
                    <form:errors path="requestPerson.address.address" cssClass="help-block"/>
                </div>
                <label class="control-label col-sm-1"><fmt:message key="user.address.postalCode"/> *</label>

                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="requestPerson.address.postalCode" id="postalCode"
                                disabled="${!editCondition}"
                                maxlength="6"/>
                    <%--<form:errors path="requestPerson.address.postalCode" cssClass="help-block"/>--%>
                </div>
            </div>
            <div class="form-group">
                <form:hidden path="requestPerson.hkAddress.id"/>
                <%--<spring:bind path="loanRequest.requestPerson.hkAddress.province">--%>
                <label class="control-label col-sm-1"><fmt:message key="loanRequest.hkAddress"/> *</label>
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <%--</spring:bind>--%>
                    <input value="${loanRequest.requestPerson.hkAddress.province}" id="hkprovinceValue" hidden/>
                    <form:select cssClass="form-control" path="requestPerson.hkAddress.province" id="hkprovince"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.hkAddress.province" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.hkAddress.city">
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <input value="${loanRequest.requestPerson.hkAddress.city}" id="hkcityValue" hidden/>
                    <select class="form-control" name="requestPerson.hkAddress.city"
                            id="hkcity" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.city"/></option>
                    </select>
                    <form:errors path="requestPerson.hkAddress.city" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.hkAddress.county">
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <input value="${loanRequest.requestPerson.hkAddress.county}" id="hkcountyValue" hidden/>
                    <select class="form-control" name="requestPerson.hkAddress.county"
                            id="hkcounty" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.county"/></option>
                    </select>
                    <form:errors path="requestPerson.hkAddress.county" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.hkAddress.address">
                <div class="col-sm-5${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.hkAddress.address" id="hkaddress"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <p class="text-danger" id="hkaddressError"></p>
                    <form:errors path="requestPerson.hkAddress.address" cssClass="help-block"/>
                </div>
                <label class="control-label col-sm-1"><fmt:message key="user.address.postalCode"/> *</label>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="requestPerson.hkAddress.postalCode" id="hkpostalCode"
                                disabled="${!editCondition}"
                                maxlength="6"/>
                    <%--<form:errors path="requestPerson.address.postalCode" cssClass="help-block"/>--%>
                </div>
            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.requestPerson.workCompany">
                <appfuse:label key="loanPerson.workCompany" path="loanRequest.requestPerson.workCompany"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.workCompany"
                                disabled="${!editCondition}"
                                id="workCompany" maxlength="255"/>
                    <form:errors path="requestPerson.workCompany" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.workPosition">
                <appfuse:label key="loanPerson.workPosition" path="loanRequest.requestPerson.workPosition"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.workPosition"
                                 disabled="${!editCondition}"
                                 id="workPosition">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableWorkPositions}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.workPosition" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.companyYears">
                <appfuse:label key="loanPerson.companyYears" path="loanRequest.requestPerson.companyYears"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.companyYears"
                                disabled="${!editCondition}"
                                id="companyYears" maxlength="3"/>
                    <form:errors path="requestPerson.companyYears" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.requestPerson.companyNature">
                <appfuse:label key="loanPerson.companyNature" path="loanRequest.requestPerson.companyNature"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.companyNature"
                                 disabled="${!editCondition}"
                                 id="companyNature">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableCompanyNatures}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.companyNature" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.companyType" path="loanRequest.requestPerson.companyType"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:select cssClass="form-control" path="requestPerson.companyType"
                                 disabled="${!editCondition}"
                                 id="companyType">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableIndustryTypes}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.companyType" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.workTelNo">
                <appfuse:label key="loanPerson.workTelNo" path="loanRequest.requestPerson.workTelNo"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control phone" path="requestPerson.workTelNo"
                                disabled="${!editCondition}"
                                id="workTelNo" maxlength="255"/>
                    <form:errors path="requestPerson.workTelNo" cssClass="help-block"/>
                </div>
            </div>
            <div class="form-group">
                <form:hidden path="requestPerson.companyAddress.id"/>
                <spring:bind path="loanRequest.requestPerson.companyAddress.province">
                <appfuse:label key="loanPerson.companyAddress" path="loanRequest.requestPerson.companyAddress.address"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <input value="${loanRequest.requestPerson.companyAddress.province}" id="comProvinceValue" hidden/>
                    <form:select cssClass="form-control" path="requestPerson.companyAddress.province" id="comProvince"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.companyAddress.province" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.companyAddress.city">
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <input value="${loanRequest.requestPerson.companyAddress.city}" id="comCityValue" hidden/>
                    <select class="form-control" name="requestPerson.companyAddress.city"
                            id="comCity" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.city"/></option>
                    </select>
                    <form:errors path="requestPerson.companyAddress.city" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.companyAddress.county">
                <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <input value="${loanRequest.requestPerson.companyAddress.county}" id="comCountyValue" hidden/>
                    <select class="form-control" name="requestPerson.companyAddress.county"
                            id="comCounty" ${(!editCondition) ? 'readonly' : ''}>
                        <option value=""><fmt:message key="option.county"/></option>
                    </select>
                    <form:errors path="requestPerson.companyAddress.county" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.companyAddress.address">
                <div class="col-sm-5${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.companyAddress.address" id="address"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <form:errors path="requestPerson.companyAddress.address" cssClass="help-block"/>
                </div>
                <label class="control-label col-sm-1"><fmt:message key="user.address.postalCode"/> *</label>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="requestPerson.companyAddress.postalCode" id="compostalCode"
                                disabled="${!editCondition}"
                                maxlength="6"/>
                    <%--<form:errors path="requestPerson.address.postalCode" cssClass="help-block"/>--%>
                </div>
            </div>
            <div class="form-group">
                <appfuse:label key="loanPerson.occupation" path="loanRequest.requestPerson.occupation"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:select cssClass="form-control" path="requestPerson.occupation"
                                 disabled="${!editCondition}"
                                 id="occupation">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableOccupation}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.occupation" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.educationLevel" path="loanRequest.requestPerson.educationLevel"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.requestPerson.educationLevel">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="requestPerson.educationLevel"
                                 disabled="${!editCondition}"
                                 id="educationLevel">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableEducationLevel}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="requestPerson.educationLevel" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.requestPerson.liveYears">
                <appfuse:label key="loanPerson.liveYears" path="loanRequest.requestPerson.liveYears"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="requestPerson.liveYears"
                                disabled="${!editCondition}"
                                id="liveYears" maxlength="3"/>
                    <form:errors path="requestPerson.liveYears" cssClass="help-block"/>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="box box-primary collapsed-box">
    <div class="box-header with-border">
        <h3 class="box-title"><fmt:message key="loanRequest.urgentContact"/></h3>

        <div class="box-tools pull-right">
            <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
        </div>
        <!-- /.box-tools -->
    </div>
    <div class="box-body">
        <div class="form-horizontal margin">
            <div class="form-group${(not empty status.errorMessage) ? ' has-error' : ''}">
                <appfuse:label key="loanRequest.urgentContact1" path="loanRequest.urgentContactName1"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.urgentContactName1">
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">    </spring:bind>
                    <form:input cssClass="form-control" path="urgentContactName1" id="urgentContactName1"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <form:errors path="urgentContactName1" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.gender" path="loanRequest.requestPerson.gender"
                               styleClass="control-label col-sm-1"/>
                <spring:bind path="loanRequest.urgentContactGender1">
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="urgentContactGender1" id="urgentContactGender1"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableGenders}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="urgentContactGender1" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.urgentContactTelNo1">

                <appfuse:label key="loanRequest.mobileNo" path="loanRequest.urgentContactTelNo1"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="urgentContactTelNo1" disabled="${!editCondition}"
                                id="urgentContactTelNo1"
                                maxlength="255"/>
                        <p class="text-danger" id="urgentContactTelNo1Validate"></p>
                    <form:errors path="urgentContactTelNo1" cssClass="help-block"/>
                </div>
                <spring:bind path="loanRequest.urgentContactRelation1">
                <appfuse:label key="loanRequest.relation" path="loanRequest.urgentContactRelation1"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="urgentContactRelation1" disabled="${!editCondition}"
                                id="urgentContactRelation1" maxlength="255"/>
                    <form:errors path="urgentContactRelation1" cssClass="help-block"/>
                </div>

            </div>


            <div class="form-group${(not empty status.errorMessage) ? ' has-error' : ''}">

                <appfuse:label key="loanRequest.urgentContact2" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactName2" id="urgentContactName2"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <form:errors path="urgentContactName2" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanPerson.gender" path="loanRequest.urgentContactGender2"
                               styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:select cssClass="form-control" path="urgentContactGender2" id="urgentContactGender2"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <form:options items="${availableGenders}" itemValue="value"
                                      itemLabel="label"/>
                    </form:select>
                    <form:errors path="urgentContactGender2" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanRequest.mobileNo" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactTelNo2" disabled="${!editCondition}"
                                id="urgentContactTelNo2"
                                maxlength="255"/>
                        <p class="text-danger" id="urgentContactTelNo2Validate"></p>
                    <form:errors path="urgentContactTelNo2" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanRequest.relation" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactRelation2" disabled="${!editCondition}"
                                id="urgentContactRelation2" maxlength="255"/>
                    <form:errors path="urgentContactRelation2" cssClass="help-block"/>
                </div>

            </div>
            <div class="form-group${(not empty status.errorMessage) ? ' has-error' : ''}">
                <appfuse:label key="loanRequest.urgentContact3" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactName3" id="urgentContactName3"
                                disabled="${!editCondition}"
                                maxlength="255"/>
                    <form:errors path="urgentContactName3" cssClass="help-block"/>
                </div>
                    <appfuse:label key="loanPerson.gender" path="loanRequest.urgentContactGender3"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:select cssClass="form-control" path="urgentContactGender3" id="urgentContactGender3"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableGenders}" itemValue="value"
                                          itemLabel="label"/>
                        </form:select>
                        <form:errors path="urgentContactGender3" cssClass="help-block"/>
                    </div>
                <appfuse:label key="loanRequest.mobileNo" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactTelNo3" disabled="${!editCondition}"
                                id="urgentContactTelNo3"
                                maxlength="255"/>
                        <p class="text-danger" id="urgentContactTelNo3Validate"></p>
                    <form:errors path="urgentContactTelNo3" cssClass="help-block"/>
                </div>
                <appfuse:label key="loanRequest.relation" styleClass="control-label col-sm-1"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    <form:input cssClass="form-control" path="urgentContactRelation3" disabled="${!editCondition}"
                                id="urgentContactRelation3" maxlength="255"/>
                    <form:errors path="urgentContactRelation3" cssClass="help-block"/>
                </div>

            </div>
        </div>
    </div>
</div>
<c:if test="${loanRequest.coLoaned}">
    <div class="box box-default ${loanRequest.coLoaned?'':'collapsed-box'}" id="coLoanBox">
        <div class="box-header with-border">
            <h3 class="box-title"><form:checkbox path="coLoaned" id="loanRequestCoLoaned" disabled="${!editCondition}"/><fmt:message
                    key="loanRequest.coApplicant"/></h3>

            <div class="box-tools pull-right">
                <button class="btn btn-box-tool" data-widget="collapse" id="coLoanBtn"><i class="fa ${loanRequest.coLoaned?'fa-minus':'fa-plus'}"></i>
                </button>
            </div>
            <!-- /.box-tools -->
        </div>
        <!-- /.box-header -->
        <div class="box-body"  >
            <form:hidden path="coPerson.id"/>
            <div class="form-horizontal margin">
                <div class="form-group">
                    <spring:bind path="loanRequest.coPerson.name">
                    <appfuse:label key="loanPerson.name" path="loanRequest.coPerson.name"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:input cssClass="form-control" path="coPerson.name" id="coName" maxlength="255"
                                    disabled="${!editCondition}"/>
                        <form:errors path="coPerson.name" cssClass="help-block"/>
                    </div>

                    <spring:bind path="loanRequest.coPerson.gender">
                    <appfuse:label key="loanPerson.gender" path="loanRequest.coPerson.gender"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:select cssClass="form-control" path="coPerson.gender" id="coGender"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableGenders}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        <form:errors path="coPerson.gender" cssClass="help-block"/>
                    </div>

                    <spring:bind path="loanRequest.coPerson.birthday">

                    <appfuse:label key="loanPerson.birthday" path="loanRequest.coPerson.birthday"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:input cssClass="form-control datepicker" path="coPerson.birthday" id="coBirthday"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="coPerson.birthday" cssClass="help-block"/>
                    </div>
                        <div class="col-sm-1">
                            <input id="coAge" class="form-control" type="text" readonly placeholder="<fmt:message key="loanRequest.age"/>"/>
                        </div>

                </div>
                <div class="form-group">
                    <appfuse:label key="loanPerson.idType" path="loanRequest.coPerson.idType"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:select cssClass="form-control" path="coPerson.idType" id="coIdType"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableIdTypes}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        </div>
                    <appfuse:label key="loanPerson.idNo" path="loanRequest.coPerson.idNo"
                                   styleClass="control-label col-sm-1"/>
                    
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control" path="coPerson.idNo" id="coIdNo" maxlength="255"
                                    disabled="${!editCondition}"/>
                        <p class="text-danger" id="coIdValidate"></p>
                        </div>
                    <appfuse:label key="loanRequest.idExpireTime" path="loanRequest.coPerson.dueDate"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control datepicker2" path="coPerson.dueDate"
                                    disabled="${!editCondition}"
                                    id="coDueDate"
                                    maxlength="255"/>
                        <form:errors path="coPerson.dueDate" cssClass="help-block"/>
                    </div>
                </div>
                <div class="form-group">
                    <appfuse:label key="loanPerson.propertyType" path="loanRequest.coPerson.propertyType"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.propertyType">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:select cssClass="form-control" path="coPerson.propertyType" id="coPropertyType"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availablePropertyTypes}" itemValue="value"
                                          itemLabel="label"/>
                        </form:select>
                        <form:errors path="coPerson.propertyType" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.homeTelNo" path="loanRequest.coPerson.homeTelNo"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control phone" path="coPerson.homeTelNo" id="coHomeTelNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="coPerson.homeTelNo" cssClass="help-block"/></div>

                </div>
                <div class="form-group">
                    <form:hidden path="coPerson.address.id"/>
                    <label class="control-label col-sm-1"><fmt:message key="loanRequest.address"/>*</label>
                    <spring:bind path="loanRequest.coPerson.address.province">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <input value="${loanRequest.coPerson.address.province}" id="coProvinceValue" hidden/>
                        <form:select cssClass="form-control" path="coPerson.address.province" id="coProvince"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        <form:errors path="coPerson.address.province" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.address.city">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <input value="${loanRequest.coPerson.address.city}" id="coCityValue" hidden/>
                        <select class="form-control" name="coPerson.address.city"
                                id="coCity" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.city"/></option>
                        </select>
                        <form:errors path="coPerson.address.city" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.address.county">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <input value="${loanRequest.coPerson.address.county}" id="coCountyValue" hidden/>
                        <select class="form-control" name="coPerson.address.county"
                                id="coCounty" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.county"/></option>
                        </select>
                        <form:errors path="coPerson.address.county" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.address.address">
                    <div class="col-sm-5${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control" path="coPerson.address.address" id="coAddress"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <p class="text-danger" id="coAddressError"></p>
                        <form:errors path="coPerson.address.address" cssClass="help-block"/>
                    </div>
                </div>
                <div class="form-group">
                    <form:hidden path="coPerson.companyAddress.id"/>
                    <appfuse:label key="loanPerson.workCompany" path="loanRequest.coPerson.workCompany"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.workCompany">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control" path="coPerson.workCompany" id="coWorkCompany"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="coPerson.workCompany" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.companyAddress" path="loanRequest.coPerson.companyAddress.address" styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.companyAddress.province">
                    <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <input value="${loanRequest.coPerson.companyAddress.province}" id="comCoProvinceValue" hidden/>
                        <form:select cssClass="form-control" path="coPerson.companyAddress.province" id="comCoProvince"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        <form:errors path="coPerson.companyAddress.province" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.companyAddress.city">
                    <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <input value="${loanRequest.coPerson.companyAddress.city}" id="comCoCityValue" hidden/>
                        <select class="form-control" name="coPerson.companyAddress.city"
                                id="comCoCity" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.city"/></option>
                        </select>
                        <form:errors path="coPerson.companyAddress.city" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.companyAddress.county">
                    <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <input value="${loanRequest.coPerson.companyAddress.county}" id="comCoCountyValue" hidden/>
                        <select class="form-control" name="coPerson.companyAddress.county"
                                id="comCoCounty" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.county"/></option>
                        </select>
                        <form:errors path="coPerson.companyAddress.county" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.coPerson.companyAddress.address">
                    <div class="col-sm-4${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control" path="coPerson.companyAddress.address" id="coCompanyAddress"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="coPerson.companyAddress.address" cssClass="help-block"/></div>
                </div>
                <div class="form-group">
                    <appfuse:label key="loanPerson.workTelNo" path="loanRequest.coPerson.workTelNo"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.workTelNo">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control phone" path="coPerson.workTelNo" id="coWorkTelNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="coPerson.workTelNo" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.mobileNo" path="loanRequest.coPerson.mobileNo"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.mobileNo">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control" path="coPerson.mobileNo" id="coMobileNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <p class="text-danger" id="coMobileValidate"></p>
                        <form:errors path="coPerson.mobileNo" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.email" path="loanRequest.coPerson.email"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.coPerson.email">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <form:input cssClass="form-control" path="coPerson.email" id="coEmail" maxlength="255"
                                    disabled="${!editCondition}"/>
                        <form:errors path="coPerson.email" cssClass="help-block"/></div>
                </div>

            </div>
        </div>
        <!-- /.box-body -->
    </div>
</c:if>
<c:if test="${loanRequest.guaranted}">
    <div class="box box-default ${loanRequest.guaranted?'':'collapsed-box'}" >
        <div class="box-header with-border">
            <h3 class="box-title"><form:checkbox path="guaranted"
                                                 id="loanRequestGuaranted" disabled="${!editCondition}"/><fmt:message
                    key="loanRequest.dbApplicant"/></h3>

            <div class="box-tools pull-right">

                <button class="btn btn-box-tool" data-widget="collapse" id="guarantedBtn"><i class="fa ${loanRequest.guaranted? 'fa-minus':'fa-plus'}"></i>
                </button>
            </div>
            <!-- /.box-tools -->
        </div>
        <!-- /.box-header -->
        <div class="box-body">
            <form:hidden path="dbPerson.id"/>
            <div class="form-horizontal margin">
                <div class="form-group">
                    <spring:bind path="loanRequest.dbPerson.name">
                        <appfuse:label key="loanPerson.name" path="loanRequest.dbPerson.name"
                                       styleClass="control-label col-sm-1"/>
                        <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                            <form:input cssClass="form-control" path="dbPerson.name" id="coName" maxlength="255"
                                        disabled="${!editCondition}"/>
                           
                        </div>
                    </spring:bind>
                    <spring:bind path="loanRequest.dbPerson.gender">
                        <appfuse:label key="loanPerson.gender" path="loanRequest.dbPerson.gender"
                                       styleClass="control-label col-sm-1"/>
                        <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                            <form:select cssClass="form-control" path="dbPerson.gender" id="coGender"
                                         disabled="${!editCondition}">
                                <option value=""><fmt:message key="option.select"/></option>
                                <form:options items="${availableGenders}" itemValue="value" itemLabel="label"/>
                            </form:select>
                            <form:errors path="dbPerson.gender" cssClass="help-block"/>
                        </div>
                    </spring:bind>
                    <spring:bind path="loanRequest.dbPerson.birthday">

                        <appfuse:label key="loanPerson.birthday" path="loanRequest.dbPerson.birthday"
                                       styleClass="control-label col-sm-1"/>
                        <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                            <form:input cssClass="form-control datepicker" path="dbPerson.birthday" id="dbBirthday"
                                        disabled="${!editCondition}"
                                        maxlength="255"/>
                            <form:errors path="dbPerson.birthday" cssClass="help-block"/>
                        </div>
                        <div class="col-sm-1">
                            <input id="dbAge" class="form-control" type="text" readonly placeholder="<fmt:message key="loanRequest.age"/>"/>
                        </div>
                    </spring:bind>
                </div>
                <div class="form-group">
                    <appfuse:label key="loanPerson.idType" path="loanRequest.dbPerson.idType"
                                   styleClass="control-label col-sm-1"/>
                    
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"> 
                        <form:select cssClass="form-control" path="dbPerson.idType" id="dbIdType"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableIdTypes}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        </div>
                    <appfuse:label key="loanRequest.idNo" path="loanRequest.dbPerson.idNo"
                                   styleClass="control-label col-sm-1"/>
                    
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control" path="dbPerson.idNo" id="dbIdNo" maxlength="255"
                                    disabled="${!editCondition}"/>
                        <p class="text-danger" id="dbIdValidate"></p>
                    </div>
                    <appfuse:label key="loanRequest.idExpireTime" path="loanRequest.dbPerson.dueDate"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control datepicker2" path="dbPerson.dueDate"
                                    disabled="${!editCondition}"
                                    id="dbDueDate"
                                    maxlength="255"/>
                        <form:errors path="dbPerson.dueDate" cssClass="help-block"/>
                    </div>
                </div>
                <div class="form-group">
                    <spring:bind path="loanRequest.dbPerson.propertyType">
                    <appfuse:label key="loanPerson.propertyType" path="loanRequest.dbPerson.propertyType"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:select cssClass="form-control" path="dbPerson.propertyType" id="coPropertyType"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availablePropertyTypes}" itemValue="value"
                                          itemLabel="label"/>
                        </form:select>
                        <form:errors path="dbPerson.propertyType" cssClass="help-block"/></div>
                    <appfuse:label key="loanRequest.homeTelNo" path="loanRequest.dbPerson.homeTelNo"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        <form:input cssClass="form-control phone" path="dbPerson.homeTelNo" id="coHomeTelNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="dbPerson.homeTelNo" cssClass="help-block"/></div>

                </div>
                <div class="form-group">
                    <form:hidden path="dbPerson.address.id"/>
                    <label class="control-label col-sm-1"><fmt:message key="loanRequest.address"/>*</label>
                    <spring:bind path="loanRequest.dbPerson.address.province">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <input value="${loanRequest.dbPerson.address.province}" id="dbProvinceValue" hidden/>
                        <form:select cssClass="form-control" path="dbPerson.address.province" id="dbProvince"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                        </form:select>
                        <form:errors path="dbPerson.address.province" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.dbPerson.address.city">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <input value="${loanRequest.dbPerson.address.city}" id="dbCityValue" hidden/>
                        <select class="form-control" name="dbPerson.address.city"
                                id="dbCity" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.city"/></option>
                        </select>
                        <form:errors path="dbPerson.address.city" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.dbPerson.address.county">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <input value="${loanRequest.dbPerson.address.county}" id="dbCountyValue" hidden/>
                        <select class="form-control" name="dbPerson.address.county"
                                id="dbCounty" ${(!editCondition) ? 'readonly' : ''}>
                            <option value=""><fmt:message key="option.county"/></option>
                        </select>
                        <form:errors path="dbPerson.address.county" cssClass="help-block"/>
                    </div>
                    <spring:bind path="loanRequest.dbPerson.address.address">
                    <div class="col-sm-5${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <form:input cssClass="form-control" path="dbPerson.address.address" id="dbAddress"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <p class="text-danger" id="dbAddressError"></p>
                        <form:errors path="dbPerson.address.address" cssClass="help-block"/>
                    </div>

                </div>
                <div class="form-group">
                    <form:hidden path="dbPerson.companyAddress.id"/>
                    <spring:bind path="loanRequest.dbPerson.workCompany">
                    <appfuse:label key="loanPerson.workCompany" path="loanRequest.dbPerson.workCompany"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:input cssClass="form-control" path="dbPerson.workCompany" id="coWorkCompany"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="dbPerson.workCompany" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.companyAddress" path="loanRequest.dbPerson.companyAddress.address"
                                   styleClass="control-label col-sm-1"/>
                        <spring:bind path="loanRequest.dbPerson.companyAddress.province">
                        <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}">
                            </spring:bind>
                            <input value="${loanRequest.dbPerson.companyAddress.province}" id="comDbProvinceValue" hidden/>
                            <form:select cssClass="form-control" path="dbPerson.companyAddress.province" id="comDbProvince"
                                         disabled="${!editCondition}">
                                <option value=""><fmt:message key="option.select"/></option>
                                <form:options items="${availableProvinces}" itemValue="value" itemLabel="label"/>
                            </form:select>
                            <form:errors path="dbPerson.companyAddress.province" cssClass="help-block"/>
                        </div>
                        <spring:bind path="loanRequest.dbPerson.companyAddress.city">
                        <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                            <input value="${loanRequest.dbPerson.companyAddress.city}" id="comDbCityValue" hidden/>
                            <select class="form-control" name="dbPerson.companyAddress.city"
                                    id="comDbCity" ${(!editCondition) ? 'readonly' : ''}>
                                <option value=""><fmt:message key="option.city"/></option>
                            </select>
                            <form:errors path="dbPerson.companyAddress.city" cssClass="help-block"/>
                        </div>
                        <spring:bind path="loanRequest.dbPerson.companyAddress.county">
                        <div class="col-sm-1${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                            <input value="${loanRequest.dbPerson.companyAddress.county}" id="comDbCountyValue" hidden/>
                            <select class="form-control" name="dbPerson.companyAddress.county"
                                    id="comDbCounty" ${(!editCondition) ? 'readonly' : ''}>
                                <option value=""><fmt:message key="option.county"/></option>
                            </select>
                            <form:errors path="dbPerson.companyAddress.county" cssClass="help-block"/>
                        </div>
                    <spring:bind path="loanRequest.dbPerson.companyAddress.address">
                    <div class="col-sm-4${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <form:input cssClass="form-control" path="dbPerson.companyAddress.address" id="dbCompanyAddress"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="dbPerson.companyAddress.address" cssClass="help-block"/></div>

                </div>
                <div class="form-group">
                    <spring:bind path="loanRequest.dbPerson.workTelNo">
                    <appfuse:label key="loanPerson.workTelNo" path="loanRequest.dbPerson.workTelNo"
                                   styleClass="control-label col-sm-1"/>
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:input cssClass="form-control phone" path="dbPerson.workTelNo" id="coWorkTelNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <form:errors path="dbPerson.workTelNo" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.mobileNo" path="loanRequest.dbPerson.mobileNo"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.dbPerson.mobileNo">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <form:input cssClass="form-control" path="dbPerson.mobileNo" id="dbMobileNo"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <p class="text-danger" id="dbMobileValidate"></p>
                        <form:errors path="dbPerson.mobileNo" cssClass="help-block"/></div>
                    <appfuse:label key="loanPerson.email" path="loanRequest.dbPerson.email"
                                   styleClass="control-label col-sm-1"/>
                    <spring:bind path="loanRequest.dbPerson.email">
                    <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"> </spring:bind>
                        <form:input cssClass="form-control" path="dbPerson.email" id="coEmail" maxlength="255"
                                    disabled="${!editCondition}"/>
                        <form:errors path="dbPerson.email" cssClass="help-block"/></div>
                </div>

            </div>

        </div>
    </div>
</c:if>
<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"><fmt:message key="loanRequest.VehicleAndLoan"/>
        </h3>

        <div class="box-tools pull-right">
            <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
        </div>
        <!-- /.box-tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body" style="display: block;">

        <div class="form-horizontal">
            <input value="${loanRequest.second}" id="loanRequestSecond" hidden/>

<spring:bind path="loanRequest.second">
            <div class="form-group${(not empty status.errorMessage) ? ' has-error' : ''}">
    </spring:bind>
        <appfuse:label key="loanRequest.second" styleClass="control-label col-sm-2"/>
        <div class="col-sm-3">
        <form:checkbox path="second"  id="second" disabled="${!editCondition}"/>
        </div>
        <appfuse:label key="loanRequest.salesman" styleClass="control-label col-sm-2"/>
        <div class="col-sm-2">
            <form:input cssClass="form-control" path="salesman" id="salesman"
                        disabled="${!editCondition}"
                        maxlength="255"/>
            <form:errors path="salesman" cssClass="help-block"/>
        </div>
            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.vehicleBrand">
                <appfuse:label key="loanRequest.vehicleBrand" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <input value="${loanRequest.vehicleBrand}" id="vehicleBrandValue" hidden/>
                    <form:select cssClass="form-control" path="vehicleBrand" id="vehicleBrand"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>
                        <c:if test="${loanRequest.vehicleBrand!=null}">
                        <form:option value="${loanRequest.vehicleBrand}" label="${loanRequest.vehicleBrand}"></form:option>
                        </c:if>
                    </form:select>
                    <form:errors path="vehicleBrand" cssClass="help-block"/>
                </div>
                    <spring:bind path="loanRequest.downPaymentRate">
                    <appfuse:label key="loanRequest.downPaymentRate" styleClass="control-label col-sm-2"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <div class="input-group">
                            <form:input cssClass="form-control" path="downPaymentRate" id="downPaymentRate"
                                        disabled="${!editCondition}"
                                        maxlength="255"/>
                            <div class="input-group-addon">%</div>
                        </div>
                        <p class="text-danger" id="downPaymentRateDescError"></p>
                        <form:errors path="downPaymentRate" cssClass="help-block"/></div>
                    <c:if test="${editCondition}">
                        <label class="help-block col-sm-3" id="downPaymentRateDesc"></label>
                    </c:if>

            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.vehicleSeries">
                <appfuse:label key="loanRequest.vehicleSeries" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <input value="${loanRequest.vehicleSeries}" id="vehicleSeriesValue" hidden/>
                        <form:select cssClass="form-control" path="vehicleSeries" id="vehicleSeries"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:option value="${loanRequest.vehicleSeries}" label="${loanRequest.vehicleSeries}"></form:option>
                        </form:select>
                    <form:errors path="vehicleSeries" cssClass="help-block"/>
                </div>
                    <spring:bind path="loanRequest.feeRate">
                    <appfuse:label key="loanRequest.feeRate" styleClass="control-label col-sm-2"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <div class="input-group">
                            <security:authorize ifAnyGranted="ROLE_DEALER_USER">
                            <form:input cssClass="form-control" path="feeRate" id="feeRate" readonly="${!editCondition}"
                                        maxlength="255"/>
                            </security:authorize>
                            <security:authorize ifNotGranted="ROLE_DEALER_USER,ROLE_DEALER_ADMIN">
                                <form:input cssClass="form-control" path="feeRate" id="feeRate" readonly="true"
                                            maxlength="255"/>
                            </security:authorize>
                            <div class="input-group-addon">%</div>
                        </div>
                        <p class="text-danger" id="feeRateError"></p>
                        <form:errors path="feeRate" cssClass="help-block"/>
                    </div>
                    <c:if test="${editCondition}">
                        <label class="help-block col-sm-3" id="feeRateDesc"></label>
                    </c:if>

            </div>

            <div class="form-group">
                <spring:bind path="loanRequest.vehicleModel">
                <appfuse:label key="loanRequest.vehicleModel" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <input value="${loanRequest.vehicleModel}" id="vehicleModelValue" hidden/>
                        <form:select cssClass="form-control" path="vehicleModel" id="vehicleModel"
                                     disabled="${!editCondition}">
                            <option value=""><fmt:message key="option.select"/></option>
                            <form:option value="${loanRequest.vehicleModel}" label="${loanRequest.vehicleModel}"></form:option>
                        </form:select>
                    <form:errors path="vehicleModel" cssClass="help-block"/>
                </div>
                    <appfuse:label key="loanRequest.loanRate" styleClass="control-label col-sm-2"/>
                    <spring:bind path="loanRequest.loanRate">
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                        <div class="input-group">
                            <form:input cssClass="form-control" path="loanRate" id="loanRate" maxlength="255"
                                        readonly="true"/>
                            <div class="input-group-addon">%</div>
                        </div>
                        <form:errors path="loanRate" cssClass="help-block"/></div>
            </div>

            <div class="form-group">
                <spring:bind path="loanRequest.ManufacturerPrice">
                <appfuse:label key="loanRequest.manufacturerPrice" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="ManufacturerPrice" id="manufacturerPrice"
                                maxlength="255" readonly="true"/>
                    <form:errors path="ManufacturerPrice" cssClass="help-block"/>
                </div>
                    <spring:bind path="loanRequest.downPaymentAmount">
                    <appfuse:label key="loanRequest.downPaymentAmount" styleClass="control-label col-sm-2"/>
                    <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                        </spring:bind>
                        <form:input cssClass="form-control" path="downPaymentAmount" id="downPaymentAmount"
                                    disabled="${!editCondition}"
                                    maxlength="255"/>
                        <%--<p class="help-block" id="downPaymentAmountDesc"></p>--%>
                        <form:errors path="downPaymentAmount" cssClass="help-block"/></div>
            </div>
            <div class="form-group">
                <spring:bind path="loanRequest.price">
                <appfuse:label key="loanRequest.price" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="price" id="price" maxlength="255"
                                disabled="${!editCondition}"/>
                    <form:errors path="price" cssClass="help-block"/>
                    <p class="text-danger" id="priceError"></p>
                </div>
                <spring:bind path="loanRequest.loanAmount">
                    <appfuse:label key="loanRequest.loanAmount" styleClass="control-label col-sm-2"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="loanAmount" id="loanAmount"
                                maxlength="255" readonly="true"/>
                    <form:errors path="loanAmount" cssClass="help-block"/>
                </div>
                <c:if test="${editCondition}">
                    <label class="help-block col-sm-3" id="loanAmountDesc"></label>
                </c:if>
            </div>
            <div class="form-group">
                <input hidden value="${loanRequest.dealer.bond.id}" id="bondId"/>
                <input hidden value="${loanRequest.loanProductId}" id="loanProductIdValue"/>
                <spring:bind path="loanRequest.loanProductId">
                <appfuse:label key="loanRequest.loanProductId" styleClass="control-label col-sm-2"/>
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:select cssClass="form-control" path="loanProductId" id="loanProduct"
                                 disabled="${!editCondition}">
                        <option value=""><fmt:message key="option.select"/></option>

                    </form:select>
                    <form:errors path="loanProductId" cssClass="help-block"/></div>
                <spring:bind path="loanRequest.monthPaymentAmount">
                <appfuse:label key="loanRequest.monthPaymentAmount" styleClass="control-label col-sm-2"/>
                <div class="col-sm-2${(not empty status.errorMessage) ? ' has-error' : ''}">
                    </spring:bind>
                    <form:input cssClass="form-control" path="monthPaymentAmount" id="monthPaymentAmount"
                                readonly="true"
                                maxlength="255"/>
                    <form:errors path="monthPaymentAmount" cssClass="help-block"/></div>
            </div>
            <div class="form-group">
                <input hidden value="${loanRequest.loanYears}" id="loanYearsValue"/>
                <appfuse:label key="loanRequest.loanYears" styleClass="control-label col-sm-2"/>
                <spring:bind path="loanRequest.loanYears">
                <div class="col-sm-3${(not empty status.errorMessage) ? ' has-error' : ''}"></spring:bind>
                    <form:select cssClass="form-control" path="loanYears" id="loanYears" disabled="${!editCondition}">
                        <option value="0"><fmt:message key="option.select"/></option>
                    </form:select>
                    <form:errors path="loanYears" cssClass="help-block"/></div>
                <appfuse:label key="loanRequest.totalReturn" styleClass="control-label col-sm-2"/>
                <div class="col-sm-2">
                    <form:input cssClass="form-control" path="totalReturnAmount" id="totalReturnAmount"
                                maxlength="255" readonly="true"/>
                </div>
            </div>
        </div>

    </div>
    <!-- /.box-body -->
</div>
